var app = angular.module('dlrk',['ng','ngRoute']);

//配置路由
app.config(function ($routeProvider) {

  $routeProvider
    .when('/map',{
      templateUrl:'tpl/map.html'
    })
    .when('/realtime',{
      templateUrl:'tpl/realtime.html'
    })
    .when('/chart',{
      templateUrl:'tpl/chart.html'
    })
    .when('/history',{
      templateUrl:'tpl/history.html'
    })
    .when('/device',{
      templateUrl:'tpl/device.html'
    })
    .when('/user',{
      templateUrl:'tpl/user.html'
    })
    .when('/logfile',{
      templateUrl:'tpl/logfile.html'
    })
    .when('/warnReport',{
      templateUrl:'tpl/warnReport.html'
    })
    .when('/warnConfig',{
      templateUrl:'tpl/warnConfig.html'
    })
    .otherwise({redirectTo:'/map'})

})

app.controller('parentCtrl',['$scope','$location',
  function ($scope,$location) {
    $scope.jump = function (desPath) {
      $location.path(desPath);
    }
  }
]);

